<%--
  Created by IntelliJ IDEA.
  User: Slava
  Date: 26.07.2014
  Time: 23:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.List" %>
<%@ page import="com.privatbank.tables.Category" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Category List</title>
</head>
<body>
<%
    List<Category> categories;
    categories = (List<Category>) request.getAttribute("categories");
%>
<b>Category list</b>
<table border=1>
    <tr>
        <th>ID_category</th>
        <th>name_category</th>
        <th>ID_category_of_parent</th>
    </tr>
    <% for (Category category : categories) { %>
    <tr>
        <td><%=category.getId() %>
        <td><%=category.getName() %>
        <td><%=category.getParentId() %>
        </td>
    </tr>
    <% } %>
</table>
</body>
</html>
